<?php
$this->pageTitle=Yii::app()->name . ' - Contact Us';

//add javascript and css file
Yii::app()->clientScript->registerScriptFile (Yii::app()->baseUrl.'/js/jquery.colorbox-min.js');
Yii::app()->clientScript->registerCssFile(Yii::app()->baseUrl.'/css/colorbox.css');
$script = <<<SCRIPT
	jQuery(document).ready(function(){

		jQuery(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
	
	});
SCRIPT;
Yii::app()->clientScript->registerScript('myscript',$script,CClientScript::POS_READY);
?>
<div class="p13t">
    <div  class="font20 yellow_color bo_b_d p2b">Trouble Tickets</div>
    
    <div class="form_contact w417 shadow_right">
    <?php $form=$this->beginWidget('CActiveForm', array(
        'id'=>'contact-form',
        'enableClientValidation'=>true,
        'clientOptions'=>array(
            'validateOnSubmit'=>true,
        ),
    )); ?>
        	<?php echo $form->errorSummary($model); ?>
            <?php echo $form->labelEx($model,'name'); ?>
            <div class="bg_txt"><?php echo $form->textField($model,'name'); ?></div> 
    
            <?php echo $form->labelEx($model,'phone'); ?>
            <div class="bg_txt"><?php echo $form->textField($model,'phone'); ?></div>
    
            <?php echo $form->labelEx($model,'email'); ?>
            <div class="bg_txt"><?php echo $form->textField($model,'email'); ?></div>

            <?php echo $form->labelEx($model,'category'); ?>
            <div class="bg_txt2 float_left"><?php echo $form->dropDownList($model, 'category', $model->getCategory(),array('empty' => Yii::t('site','Please Select'))); ?></div>

            <?php echo $form->labelEx($model,'subject'); ?>
            <div class="bg_txt"><?php echo $form->textField($model,'subject',array('size'=>60,'maxlength'=>128)); ?></div>
        
            <?php echo $form->labelEx($model,'body'); ?>
            <div class="bg_textarea"> <?php echo $form->textArea($model,'body',array('rows'=>6, 'cols'=>50)); ?></div>
            <a class="bt_send" href="javascript:void(0)" onclick="document.forms[0].submit();">Send</a>
    <?php $this->endWidget(); ?>
	     
     <?php if(Yii::app()->user->hasFlash('contact-success')): ?>
     <div class="flash-success">
		<?php echo Yii::app()->user->getFlash('contact-success'); ?>
	 </div>
	 <?php elseif(Yii::app()->user->hasFlash('contact-error')): ?>
 	<div class="flash-error">	
 		<?php echo Yii::app()->user->getFlash('contact-error'); ?>
 	</div>
     <?php endif; ?>
	        
    </div><!-- .form_contact -->
        
    <div class="p40t w520 float_left p40l">
	    <div class=" bo_b_d1 p13b"><img src="images/logo_contact.png"/></div>
	    <div class=" bo_b_d1 box_address">
	    <img src="images/icon_address.png"/>
	    222 S Harbor, suite 740, Anaheim, CA, 92805<br />
	    <a class="iframe" href="googlemap.html"> Find us on Google Map. Click here &raquo;</a>
	    <div class="cb"></div>
	    </div>
	    <div class=" box_address">
		    <img src="images/icon_email.png"/>
		    <a href="mailto:info@011com.com">info@011com.com</a>
		        Phone:714 - 683 - 1001
		    <div class="cb"></div>
	    </div>
    
    </div>
    <div class="cb"></div>
</div><!-- .p13t -->